From f87de92aa2bd02096608d38d295136666533e83d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 28 May 1994 12:54:52 +0000 Subject: [PATCH] (enable-flow-control): Fix bugs turning off flow ctrl. --- lisp/flow-ctrl.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/flow-ctrl.el b/lisp/flow-ctrl.el index f871493c0a2..e2cef00684b 100644 --- a/lisp/flow-ctrl.el +++ b/lisp/flow-ctrl.el @@ -62,10 +62,14 @@ With arg, enable flow control mode if arg is positive, otherwise disable." (progn ;; Turn flow control off, and stop exchanging chars. (set-input-mode t nil (nth 2 (current-input-mode))) - (aset keyboard-translate-table flow-control-c-s-replacement nil) - (aset keyboard-translate-table ?\^s nil) - (aset keyboard-translate-table flow-control-c-q-replacement nil) - (aset keyboard-translate-table ?\^q nil)) + (if keyboard-translate-table + (progn + (aset keyboard-translate-table flow-control-c-s-replacement + flow-control-c-s-replacement) + (aset keyboard-translate-table ?\^s ?\^s) + (aset keyboard-translate-table flow-control-c-q-replacement + flow-control-c-q-replacement) + (aset keyboard-translate-table ?\^q ?\^q)))) ;; Turn flow control on. ;; Tell emacs to pass C-s and C-q to OS. (set-input-mode nil t (nth 2 (current-input-mode))) -- 2.30.2